1. Technical Field
The present invention relates to data recording in general, and in particular to a method and apparatus for performing data backup.
2. Description of Related Art
If data previously recorded on a recording medium, such as a magnetic disk, have been corrupted, an enormous effort is required to recover the data. A common method for avoiding the above-mentioned problem is to perform a backup operation by copying the data from the recording medium to a backup medium, such as a magnetic tape, during non-working hours. Then, even if the data in the recording medium become corrupted for any reason, the corrupted data can be restored by using the corresponding data stored in the backup medium.
There are several conventional methods for performing a backup operation. The first method is known as a differential backup. A differential backup allows a backup operation to end within a short time. Specifically, in every backup operation, among all the data that need to be backed up, whichever part that has been changed since the last backup operation will be extracted and copied to a backup medium. For example, a differential backup can be performed as follows:    1. In a first backup run, all the data that needs to be backed up are copied (a full backup); and    2. In a second and subsequent backup runs, a difference between the data at the current time and data at the time of the last backup run is extracted, and then a differential backup is generated. The difference can be extracted by using file time-stamps, version numbers of data, or the like. The version numbers are managed by a file system or a disk device in a way that each of the version numbers is assigned to each file block.
When a backup is created by using this method, the restoration of data requires a heavy workload. This is because it is necessary to restore the full backup created in the first backup run and then to sequentially restore the differential backups created in the second and subsequent backup runs. In addition, with this method, pieces of backup data needed for restoration are scattered across a large number of backup media. Thus, there is a risk that some data may not be able to be restored due to a loss or damage of any of the backup media.
One way to decrease the workload and the risk of the first method is to employ a second method in which a full backup is created on a more frequent basis. For example, a full backup is created once a week, and differential backups are created on the other days.
The third method allows all differential backups, each specified by using a level, to be combined similar to the “dump” command in UNIX. With the third method, a differential level, such as a monthly backup, a weekly backup or a daily backup, is assigned to each of the backups, and each of the backups is executed according to the assigned level. In every backup, the level is used for controlling the extraction of a difference in data that should be actually backed up. For example, in a weekly backup, whatever part of data that has changed since the last weekly or monthly backup is extracted regardless of whether or not a backup of the part has been created in the daily backups. Such part is then copied to a backup medium.
With the third method, data are restored as follows. Initially, the data is restored to a state in the latest month by using the monthly backup. Then, data pieces different from those of the above state are restored by using the weekly backups, and finally data are restored on a daily basis by using the daily backups. The third method, which uses a combination of the backups of different time frames, can reduce the number of backup media needed for restoration.